Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Table): add filter to colum settings #1627

Merged
merged 7 commits into from
Jun 13, 2024
Merged

Conversation

polikashina
Copy link
Contributor

Added search for column settings for withTableSettings HOC
https://st.yandex-team.ru/UXRFC-485

@polikashina polikashina requested a review from Raubzeug as a code owner June 4, 2024 11:03
@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Playwright Test Component is ready.

src/components/Table/README.md Outdated Show resolved Hide resolved
@@ -242,6 +246,17 @@ const mapItemDataToProps = (item: TableColumnSetupItem): ListItemCommonProps =>
};
};

const defaultFilterItemsFn = (item: TableColumnSetupItem, value: string) => {
return typeof item.title === 'string'
? item.title.toLowerCase().includes(value.toLowerCase())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also trim value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -242,6 +246,17 @@ const mapItemDataToProps = (item: TableColumnSetupItem): ListItemCommonProps =>
};
};

const defaultFilterItemsFn = (item: TableColumnSetupItem, value: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be it's passible to use useListFilter from this example and not realise filtration logic from stretch?

it is also welcome for the development of a hook component for filtering

@polikashina @amje @Raubzeug What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

@amje
Copy link
Contributor

amje commented Jun 8, 2024

Can we remove the delay?

2024-06-08.22.53.39.mov

@polikashina
Copy link
Contributor Author

Can we remove the delay?

2024-06-08.22.53.39.mov

There is a delay because of debounce. It is possible to set it to 0ms

@polikashina polikashina requested a review from amje June 10, 2024 13:43
@amje
Copy link
Contributor

amje commented Jun 10, 2024

Can we remove the delay?
2024-06-08.22.53.39.mov

There is a delay because of debounce. It is possible to set it to 0ms

Let's set to 0. There is no reason to wait user finishes input

@polikashina polikashina force-pushed the filterable-table-settings branch from e839ec9 to 6e70da7 Compare June 11, 2024 14:57
@polikashina
Copy link
Contributor Author

Can we remove the delay?
2024-06-08.22.53.39.mov

There is a delay because of debounce. It is possible to set it to 0ms

Let's set to 0. There is no reason to wait user finishes input

done

@amje amje changed the title feat: search in table colum settings feat(Table): add filter to colum settings Jun 11, 2024
@polikashina polikashina merged commit 6eca546 into main Jun 13, 2024
5 checks passed
@polikashina polikashina deleted the filterable-table-settings branch June 13, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants